package cn.crm.service.impl;

import cn.crm.dao.BasDictDao;
import cn.crm.dao.CstActivityDao;
import cn.crm.pojo.BasDict;
import cn.crm.pojo.CstActivity;
import cn.crm.pojo.CstLinkman;
import cn.crm.service.BasDictService;
import cn.crm.service.CstActivityService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)//事务回滚
@Service
public class CstActivityServiceImpl extends ServiceImpl<CstActivityDao, CstActivity> implements CstActivityService {
    @Autowired
    private CstActivityDao cstActivityDao;
    @Override
    public List<CstActivity> getListByCustNo(String custNo) {
        LambdaQueryWrapper<CstActivity> lqw = new LambdaQueryWrapper<>();
        lqw.eq(CstActivity::getAtvCustNo,custNo);
        return cstActivityDao.selectList(lqw);
    }
}
